package cn.emall;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@MapperScan("cn.emall.mapper")
@EnableDiscoveryClient
@EnableSwagger2
@EnableConfigurationProperties(value = cn.emall.config.JwtProperties.class)
public class EmallProductApplication {
    @Bean
    @LoadBalanced
    public RestTemplate template(){
        return new RestTemplate();
    }
    public static void main(String[] args) {
        SpringApplication.run(EmallProductApplication.class, args);
    }
}
